Refactor ban and kick commands to use followup responses instead of respond#183
Merged
dimoschi merged 4 commits intohackthebox:mainfrom Apr 15, 2026
Merged
Conversation
…espond. Added defer calls for better user experience. Updated tests accordingly.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #183 +/- ##
==========================================
+ Coverage 64.73% 65.19% +0.45%
==========================================
Files 52 52
Lines 3043 3048 +5
==========================================
+ Hits 1970 1987 +17
+ Misses 1073 1061 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…us failure scenarios - Removed redundant user not found check in the kick command. - Added tests for kicking staff members, bot members, self-kicking, and handling HTTP exceptions. - Enhanced test coverage for ban commands to include user not found scenarios.
dimoschi
reviewed
Apr 14, 2026
- Implemented a check to handle cases where the user is not found in the server before proceeding with the kick operation. - This enhances error handling and improves user feedback during the kick command execution.
- Added a new test to handle cases where the user to be kicked is not found in the guild. - Improved existing test to check for users who have left the server, ensuring accurate feedback is provided to moderators. - Updated assertions to confirm that no kick action is performed when the user is not found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that apply.Proposed changes
Ban and kick commands use follow-up responses instead of respond. Added deferred calls for a better user experience. Updated tests accordingly.
Checklist
Put an
xin the boxes that apply.doc.
Additional Notes
It should fix issue #173